import request from '@/utils/request'


// //我的订阅
// export function getMySub(params) {
//   return request({
//     url: '/api/theme/apiMySub',
//     method: 'post',
//     params
//   })
// }

//行业分类
export function getMySub(params) {
  return request({
    url: '/api/v2/file/getThemes',
    method: 'post',
    params
  })
}

// 获取所有的订阅
export function getThemes() {
  return request({
    url: 'api/web/getThemes',
    method: 'post'
  })
}

// 订阅主题
export function subTheme(sid,tid) {
  return request({
    url: '/api/theme/apiSubOne',
    method: 'post',
    data: {
      sid:sid,
      theme_id: tid
    }
  })
}

// 订阅多个主题
export function subThemes(sid,themes) {
  return request({
    url: '/api/theme/apiSub',
    method: 'post',
    data: {
      sid:sid,
      themes: themes
    }
  })
}

// 取消订阅
export function unSubTheme(sid,tid) {
  return request({
    url: '/api/theme/unSubOne',
    method: 'post',
    data: {
      sid:sid,
      theme_id: tid
    }
  })
}

//主题主页
export function subIndex(sid){
  return request({
    url:'/api/theme/apiindex',
    method:'post',
    data:{
      sid:sid
    }
  })
}